package io.zw.modules.xinpai.entity;

import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.zw.common.validator.group.AddGroup;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.*;
import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * 
 * 
 * @author zhuwei
 * @email 121203654@qq.com
 * @date 2018-10-10 13:15:04
 */
@TableName("tj_users")
public class UsersEntity implements Serializable {
	private static final long serialVersionUID = 1L;

	/**
	 * 
	 */
	@TableId
	private Long uId;
	/**
	 * 设备imei号
	 */
	private String imei;
	/**
	 * 手机号
	 */
	@NotBlank(message = "联系电话不能为空",groups = AddGroup.class)
	private String mobile;
	/**
	 * 用户姓名
	 */
	@NotBlank(message = "用户姓名不能为空",groups = AddGroup.class)
	private String name;
	/**
	 * 性别
	 */
	@NotNull(message = "请选择一个性别",groups = AddGroup.class)
	@Min(value = 1,message = "请选择一个性别",groups = AddGroup.class)
	private Integer sex;
	/**
	 * 生日
	 */
	@Past(message = "这是一个还未出生人员的【出生日期】",groups = AddGroup.class)
	@NotNull(message = "出生日期不能为空",groups = AddGroup.class)
	@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
	private Date birthday;
	/**
	 * 身份证号
	 */
	@Pattern(message = "请输入一个合法的身份证",regexp = "^(\\d{6})(19|20)(\\d{2})(1[0-2]|0[1-9])(0[1-9]|[1-2][0-9]|3[0-1])(\\d{3})(\\d|X|x)?$",groups = AddGroup.class)
	@Length(min=18,max = 18,message = "请输入一个18位的身份证号",groups = AddGroup.class)
	@NotBlank(message = "身份证不能为空",groups = AddGroup.class)
	private String idCard;
	/**
	 * 职位
	 */
	@NotBlank(message = "职位不能空",groups = AddGroup.class)
	private String positionId;
	/**
	 * 民族
	 */
	private String volk;
	/**
	 * 籍贯
	 */
	private String naivePlace;
	/**
	 * 地址
	 */
	private String address;
	/**
	 * 婚姻状况
	 */
	@NotNull(message = "请选择婚姻状况",groups = AddGroup.class)
	@Min(value = 1,message = "请选择婚姻状况",groups = AddGroup.class)
	private Integer marriage;
	/**
	 * 部门
	 */
	@NotNull(message = "请选择一个部门",groups = AddGroup.class)
	@Min(value = 1,message = "请选择一个部门",groups = AddGroup.class)
	private Integer deptId;
	/**
	 * 所属项目
	 */
	@NotNull(message = "请选择一个项目",groups = AddGroup.class)
	@Min(value = 1,message = "请选择一个项目",groups = AddGroup.class)
	private Integer projectId;
	/**
	 * 人员状态
	 */
	private Integer state;

	/**
	 * 区域ID列表
	 */
	@TableField(exist=false)
	private List<Long> areaList;

	private Long firmId;
	/**
	 * 经纬度
	 */
	private String location;
	/**
	 * 设置：
	 */
	public void setUId(Long uId) {
		this.uId = uId;
	}
	/**
	 * 获取：
	 */
	public Long getUId() {
		return uId;
	}
	/**
	 * 设置：设备imei号
	 */
	public void setImei(String imei) {
		this.imei = imei;
	}
	/**
	 * 获取：设备imei号
	 */
	public String getImei() {
		return imei;
	}
	/**
	 * 设置：手机号
	 */
	public void setMobile(String mobile) {
		this.mobile = mobile;
	}
	/**
	 * 获取：手机号
	 */
	public String getMobile() {
		return mobile;
	}
	/**
	 * 设置：用户姓名
	 */
	public void setName(String name) {
		this.name = name;
	}
	/**
	 * 获取：用户姓名
	 */
	public String getName() {
		return name;
	}
	/**
	 * 设置：性别
	 */
	public void setSex(Integer sex) {
		this.sex = sex;
	}
	/**
	 * 获取：性别
	 */
	public Integer getSex() {
		return sex;
	}
	/**
	 * 设置：生日
	 */
	public void setBirthday(Date birthday) {
		this.birthday = birthday;
	}
	/**
	 * 获取：生日
	 */
	public Date getBirthday() {
		return birthday;
	}
	/**
	 * 设置：身份证号
	 */
	public void setIdCard(String idCard) {
		this.idCard = idCard;
	}
	/**
	 * 获取：身份证号
	 */
	public String getIdCard() {
		return idCard;
	}
	/**
	 * 设置：职位
	 */
	public void setPositionId(String positionId) {
		this.positionId = positionId;
	}
	/**
	 * 获取：职位
	 */
	public String getPositionId() {
		return positionId;
	}
	/**
	 * 设置：民族
	 */
	public void setVolk(String volk) {
		this.volk = volk;
	}
	/**
	 * 获取：民族
	 */
	public String getVolk() {
		return volk;
	}
	/**
	 * 设置：籍贯
	 */
	public void setNaivePlace(String naivePlace) {
		this.naivePlace = naivePlace;
	}
	/**
	 * 获取：籍贯
	 */
	public String getNaivePlace() {
		return naivePlace;
	}
	/**
	 * 设置：地址
	 */
	public void setAddress(String address) {
		this.address = address;
	}
	/**
	 * 获取：地址
	 */
	public String getAddress() {
		return address;
	}
	/**
	 * 设置：婚姻状况
	 */
	public void setMarriage(Integer marriage) {
		this.marriage = marriage;
	}
	/**
	 * 获取：婚姻状况
	 */
	public Integer getMarriage() {
		return marriage;
	}
	/**
	 * 设置：部门
	 */
	public void setDeptId(Integer deptId) {
		this.deptId = deptId;
	}
	/**
	 * 获取：部门
	 */
	public Integer getDeptId() {
		return deptId;
	}
	/**
	 * 设置：所属项目
	 */
	public void setProjectId(Integer projectId) {
		this.projectId = projectId;
	}
	/**
	 * 获取：所属项目
	 */
	public Integer getProjectId() {
		return projectId;
	}
	/**
	 * 设置：人员状态
	 */
	public void setState(Integer state) {
		this.state = state;
	}
	/**
	 * 获取：人员状态
	 */
	public Integer getState() {
		return state;
	}

	public List<Long> getAreaList() {
		return areaList;
	}

	public void setAreaList(List<Long> areaList) {
		this.areaList = areaList;
	}

	public String getLocation() {
		return location;
	}

	public void setLocation(String location) {
		this.location = location;
	}

	public Long getFirmId() {
		return firmId;
	}

	public void setFirmId(Long firmId) {
		this.firmId = firmId;
	}
}
